package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import com.rockcent.mall.lib.domain.MerchantOrderItem;
import com.rockcent.mall.lib.domain.Product;
import com.rockcent.mall.lib.domain.enumclass.ProductEventType;

import java.util.List;

/**
 * Created by zhangjh on 2016/11/4.
 */
public class ProductEventDto extends DtoEntity {
    /**
     * 用户浏览或购买的产品，不能为空
     */
    private Product product;
    /**
     * 如果下单，订单信息不能为空
     */
    private MerchantOrderItem merchantOrderItem;
    /**
     * 渠道 可以为空
     */
    private String channelId;
    /**
     * 分享码，可以为空
     */
    private String shareCode;
    /**
     * 分销码 可以为空
     */
    private String salesCode;
    /**
     * 访客ID，
     */
    private Long customerId;
    /**
     * 访客名称
     */
    private String customerName;
    /**
     * 事件类型，不能为空
     */
    private ProductEventType eventType;

    public ProductEventDto(Product product, Long customerId, ProductEventType eventType) {
        this.product = product;
        this.customerId = customerId;
        this.eventType = eventType;
    }

    public ProductEventDto(Product product,MerchantOrderItem merchantOrderItem, Long customerId, ProductEventType eventType) {
        this.product = product;
        this.merchantOrderItem = merchantOrderItem;
        this.customerId = customerId;
        this.eventType = eventType;
    }


    public ProductEventDto() {
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public MerchantOrderItem getMerchantOrderItem() {
        return merchantOrderItem;
    }

    public void setMerchantOrderItem(MerchantOrderItem merchantOrderItem) {
        this.merchantOrderItem = merchantOrderItem;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getShareCode() {
        return shareCode;
    }

    public void setShareCode(String shareCode) {
        this.shareCode = shareCode;
    }

    public String getSalesCode() {
        return salesCode;
    }

    public void setSalesCode(String salesCode) {
        this.salesCode = salesCode;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public ProductEventType getEventType() {
        return eventType;
    }

    public void setEventType(ProductEventType eventType) {
        this.eventType = eventType;
    }

    @Override
    public String toString() {
        return "ProductEventDto{" +
                "product=" + product +
                ", merchantOrderItem=" + merchantOrderItem +
                ", channelId='" + channelId + '\'' +
                ", shareCode='" + shareCode + '\'' +
                ", salesCode='" + salesCode + '\'' +
                ", customerId=" + customerId +
                ", customerName='" + customerName + '\'' +
                ", eventType=" + eventType +
                '}';
    }
}
